<template>
  <div class="md-shared-aside">
    <div class="aside kefu">
      <div class="kefu-hover">
        <div class="sanjiao"></div>
        <p class="title">在线客服</p>
        <p class="time">服务时间：9:00 - 18:30</p>
        <div class="kefu-btn">联系客服</div>
      </div>
    </div>
    <div class="aside erwem">
      <div class="erwem-hover">
        <div class="sanjiao"></div>
        <img src="../assets/img/contact-qr.png" style="width: 100%" />
      </div>
    </div>
    <div class="aside phone">
      <div class="phone-hover">
        <div class="sanjiao"></div>
        <p class="title">客服电话：18906617558</p>
      </div>
    </div>
    <div class="aside top" @click="backTop"></div>
  </div>
</template>
<script>
export default {
  name: 'MdSharedAsideComponent',
  methods: {
    backTop () {
      document.documentElement.scrollTop = 0;
    },
  },
};
</script>
<style lang="less" scoped>
.md-shared-aside {
  position: fixed;
  right: 30px;
  top: 61.8%;
  z-index: 1;
  transform: translateY(-50%);
  .aside {
    width: 46px;
    height: 46px;
    background: #fff;
    border-radius: 4px;
    position: relative;
    margin-bottom: 10px;
    cursor: pointer;
    .kefu-hover,
    .erwem-hover,
    .phone-hover {
      position: absolute;
      right: 62px;
      top: 0;
      font-size: 14px;
      cursor: pointer;
      display: none;
      width: 200px;
      padding: 10px 15px;
      background: #f5f9ff;
      box-shadow: 1px 3px 9px 0 rgb(51 51 51 / 16%);
      border-radius: 2px;
      .sanjiao {
        position: absolute;
        right: -13px;
        top: 20px;
        width: 0;
        height: 0;
        transition: 0.5s;
        border-color: transparent transparent #f5f9ff;
        border-style: solid;
        border-width: 0 10px 10px;
        transform: rotate(90deg);
      }
      .title {
        color: #343434;
        font-weight: 600;
      }
      .time {
        color: #666;
        margin-top: 3px;
      }
      .kefu-btn {
        width: 121px;
        height: 28px;
        border-radius: 2px;
        text-align: center;
        line-height: 28px;
        color: #fff;
        margin: 15px 0 10px 0;
        background-color: #0078ff;
      }
    }
    &.kefu {
      background: url(../assets/img/gw/aside-icont1.jpg) center no-repeat;
      background-size: 100% 100%;
      &:hover {
        background: url(../assets/img/gw/aside-icont5.jpg) center no-repeat;
        background-size: 100% 100%;
        .kefu-hover {
          display: block;
        }
      }
    }
    &.erwem {
      background: url(../assets/img/gw/aside-icont2.jpg) center no-repeat;
      background-size: 100% 100%;
      &:hover {
        background: url(../assets/img/gw/aside-icont7.jpg) center no-repeat;
        background-size: 100% 100%;
        .erwem-hover {
          display: block;
        }
      }
    }
    &.phone {
      background: url(../assets/img/gw/aside-icont3.jpg) center no-repeat;
      background-size: 100% 100%;
      &:hover {
        background: url(../assets/img/gw/aside-icont6.jpg) center no-repeat;
        background-size: 100% 100%;
        .phone-hover {
          display: block;
        }
      }
    }
    &.top {
      background: url(../assets/img/gw/aside-icont4.jpg) center no-repeat;
      background-size: 100% 100%;
      &:hover {
        background: url(../assets/img/gw/aside-icont8.jpg) center no-repeat;
        background-size: 100% 100%;
      }
    }
  }
}
</style>
